<template>
	<view>
	    <view class="topbg">
	        <view class="uinfo" v-if="wxuserinfo" @click="getlogin2">
	            <view class="lefticin">
	                <view class="uheadimg2"><image :src="wxuserinfo.headimgurl" class="headimg" /></view>
	                <view class="uinam">
	                    <view class="nickname">{{wxuserinfo.nickname}}</view>
	                    <view class="scope">
	                      <view class="scope">
	                      <image 
	                      src="https://ayh.wissun.net/static/ayh/V2_svip.png" mode="widthFix" class="viptip" />
	                    </view>
	                    </view>
	                </view>
	            </view>
	        </view>
	        <view v-if="!wxuserinfo" class="nologin" >
	          <view class="lefticin">
	            <button hover-class="none" type="primary"  
	            @click="getlogin2" class="nulogin" >
	                <view class="uheadimg">
	                    <image 
	                    src="https://ayh.wissun.net/static/ayh/logo(1).png" class="headimg" />
	                </view>
	                <view class="uinam">
	                    <view class="nickname">你好，明一</view>
	                    <view class="scope">
	                      <image 
	                      src="https://ayh.wissun.net/static/ayh/V2_svip.png" mode="widthFix" class="viptip" />
	                    </view>
	                </view>
	              </button>
	            </view>
	        </view>
	    </view>
	    <view class="logopic">
	        <image src="https://ayh.wissun.net/static/ayh/logo(1).png" mode="widthFix"/>
	    </view>
	    <view class="orderlist">
	        <view class="ordertitle" >
	            <view class="otitle dads" bind:tap="go_to_integral_log">
	                <view class="mynumma">我的积分></view>
	                <view class="jifnum">{{wxuserinfo.integral}}</view>
	            </view>
	            <view class="gomore fdc" @click="go_to_integral_center">积分兑换 》</view>
	        </view>
	        <view class="sticon">
	            <view class="threeitem">
	                <view class="itemli" @click="myinfo">
	                    <image src="https://ayh.wissun.net/static/ayh/icon25.png" />
	                    <text class="pt">我的信息</text>
	                </view>
	                <view class="itemli tuod" @click="goorder">
	                    <image src="https://ayh.wissun.net/static/ayh/order.png" class="wdppc" />
	                    <text class="pt">我的订单</text>
	                </view>
	               
	                <view class="itemli" @click="goaddress">
	                    <image src="https://ayh.wissun.net/static/ayh/icon26.png" />
	                    <text class="pt">地址管理</text>
	                </view>
	                <!-- <view class="itemli tuod" @click="goorder3">
	                    <image src="https://ayh.wissun.net/static/ayh/cca.png" class="wdppc" />
	                    <text class="pt">抽奖记录</text>
	                </view> -->
	            </view>
	        </view>
	    </view>
	  
	    <view class="ordnav" @click="duojisys">
	        <view class="orditle" >
	            <view class="otitle">
	              <image src="https://ayh.wissun.net/static/ayh/jxs1.png" 
				  class="iconuserinfo" mode="widthFix" />
	              <view>发货系统</view>
	            </view>
	            <view class="gomore">去登录</view>
	        </view>
	    </view>
		
		
		
	</view>
	

</template>

<script>
	export default {
		data() {
			return {
				integral:0,
				wxuserinfo:[]
			}
		},
		onShow() {
			this.get_data();
		},
		methods: {
			duojisys(){
				uni.redirectTo({
					url:"/pages/main/duojifahuo/login"
				})
			},
			getlogin2(){
				uni.navigateTo({
				  url: '/pages/index/login'
				})
			},
			goaddress(){
				uni.navigateTo({
					url:"/pages/address/list"
				})
			},
			myinfo(){
				uni.navigateTo({
					url:"/pages/index/userinfo"
				})
			},
			goorder(){
				uni.navigateTo({
					url:"/pages/naipin/order"
				})
			},
			go_to_integral_center(){
				uni.navigateTo({
					url:"/pages/naipin/index"
				})
			},
			get_data(){
				var that=this;
				var postdata={}
				postdata.openid=uni.getStorageSync("openid")
				this.request('/api/index/get_user_info', postdata,"post").then(data => {
					that.wxuserinfo=data.info
				})
			}
		}
	}
</script>

<style>
.topbg{
    background: url("https://ayh.wissun.net/static/ayh/1.png");
    background-size: 100% 100%;
    height: 293px;
    width: 100%;
}
.dads{
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.fdc{
  color: #111 !important;
  line-height: 45px;
}
.mynumma{
  font-size: 12px;
  color: #131212;
}
.wdppc{
  width: 28px !important;
  height: 28px !important;
}
.tuod{
  position:relative;
  top: -4px;
}
.jifnum{
  font-size: 20px;
  font-weight: bold;
}
.bannerlist{
    width: calc(100% - 40px);
    margin: 0 auto;
    height: 182px;
    position: relative;
    top: -90px;
}
.bannerlist image{
    width: 100%;
    height: 100%;
}
.uinfo{
    display: flex;
    width: 100%;
    height: 150px;
    color: #fff;
    height: 60px;
    position: relative;
    top: 50px;
    /* left: 30px; */
}
.lefticin{
    display: flex;
    width: calc(100% - 50px);
}
.uheadimg{
    width: 60px;
    height: 60px;
    border: 3px solid #fff;
    border-radius: 50%;
}
.uheadimg2{
  width: 60px;
    height: 60px;
    border: 3px solid #fff;
    border-radius: 50%;
    margin-left: 35px;
}
.demoji{
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  font-size: 14px;
  left: 6px;
  position: relative;
}
.nulogin{
  display:flex;
  width: 275px !important;
  padding: 0px;
  height: 75px !important;
}
.uheadimg2 image{
  width: 60px;
  height: 60px;
  border-radius: 50%;
}
.uheadimg image{
  width: 60px;
  height: 60px;
  border-radius: 50%;
}
.uheadimg1{
    width: 130rpx !important;
    height: 124rpx;
    border-radius: 50%;
}
.uheadimg22{
    width: 130rpx;
    height: 124rpx;
    border-radius: 50%;
    position: relative;
    left: -24px;
    top: -7px;
}
page{
    background-color: #fff;
    /* 185ab0 */
}
.uinam{
    width: calc(100% - 120rpx);
    margin-left: 10px;
    height: 45px;
    padding-top: 8px;
    color: #000;
    font-family: "微软雅黑";
}
.scope{
    font-size: 14px;
}
.qdlist{
    position: absolute;
    right: 25px;
    top: 65px;
    z-index: 9999;
}
.qddtxt{
    font-size: 14px;
    color: #00A1A9;
    font-family: "微软雅黑";
    text-stroke: 1rpx #fff;
    -webkit-text-stroke: 1rpx #fff;
}
.logopic{
    width:49px;
    position: fixed;
    height: 50px;
    position: absolute;
    top: 9px;
    right: 20px;
}
.logopic image{
    width: 100%;
    height: 100%;
}
.qdlist image{
    width: 30px;
    height: 30px;
}
.orderlist{
    width: calc(100% - 60px);
    margin: 0 auto;
    border-radius: 10px;
    background-color: #fff;
    padding: 10px;
    position: relative;
    top: -70px;
    border-bottom: 1rpx solid rgb(233, 233, 233);
}
.ordertitle{
    display:flex;
    justify-content: space-between;
    border-bottom: 1rpx solid rgb(233, 233, 233);
    padding-bottom: 10px;
}
.ordnav{
    width: calc(100% - 60px);
    margin: 0 auto;
    height: 20px;
    border-radius: 10px;
    background-color: #fff;
    padding: 10px;
    position: relative;
    margin-bottom: 10px;
    border-bottom: 1rpx solid rgb(233, 233, 233);
}
.orditle {
    display:flex;
    justify-content: space-between;
    font-family: "微软雅黑";
    font-weight: bold;
}
.kefudbt{
  position: absolute;
  text-align: left;
  left: 0px;
  top: -10px;
  padding-left: 0px;
}
.otitle{
    font-size: 13px;
    color: #111;
    display: flex;
}
.iconuserinfo{
  width: 20px;
  position:relative;
  top:-2px;
  padding-right: 5px;
  display: none;
}
.gomore{
    color: #999;
    font-size: 14px;
}
.itemli{
    width: calc(100% / 2);
    text-align: center;
    display:grid;
    flex-direction: column;
    justify-items: center;
    font-size: 14px;
}
.threeitem{
    display:flex;
    margin-top: 20px;
}
.pt{padding-top: 5px;}
.threeitem image{
    width: 20px;
    height: 20px;
}
.nologin{
    padding: 35px;
}
.viptip{
  width: 30px;
}
.nickname{
    font-weight: bold;
    color: #393D49;
    font-size: 20px;
    /* text-stroke: 1rpx #eee; */
    /* -webkit-text-stroke: 1rpx #eee; */
}
.nologin button{
    text-align: left;
    padding-left: 0px;
    margin-left: 0px;
    color: #4CAF50;
    width: 100px;
    height: 44px;
    line-height: 29px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 4px;
    font-weight: 500;
}
uni-button:after{
	border:none;
}
button[type=primary] {
   background-color: transparent !important;
}
button:not([size='mini']) {
    background-color: transparent !important;
 }
 .avatar-wrapper {
    padding: 0;
    width: 56px !important;
    border-radius: 8px;
    margin-top: 40px;
    margin-bottom: 40px;
    background-color: #fff;
  }
  
  .avatar {
    display: block;
    width: 56px;
    height: 56px;
  }
</style>
